package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {
    //分类列表
    List<Category> findAll();
    //新增分类
    void save(Category category);
    //修改分类(子接口重写父接口方法)
    //int updateById(Category category);
    /*根据分类id查询菜品数量*/
    Long counDishByCategoryId(Long id);
    //根据分类id查询套餐数量
    Long countSetmealByCategoryId(Long id);
    //根据id删除分类
    void deleteById(Long id);
}
